﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SlamCms.SharePoint.SlamProfiles.ContentItem
{
	public static class ContentItemStatus
	{
		private static ContentItemStatusValue _live;
		public static ContentItemStatusValue Live
		{
			get
			{
				if (_live == null)
				{
					_live = new ContentItemStatusValue(3, "Live");
				}
				return _live;
			}
		}

		private static ContentItemStatusValue _modified;
		public static ContentItemStatusValue Modified
		{
			get
			{
				if (_modified == null)
				{
					_modified = new ContentItemStatusValue(4, "Modified");
				}
				return _modified;
			}
		}

		private static ContentItemStatusValue _new;
		public static ContentItemStatusValue New
		{
			get
			{
				if (_new == null)
				{
					_new = new ContentItemStatusValue(1, "New");
				}
				return _new;
			}
		}

		private static ContentItemStatusValue _pendingApprovalNew;
		public static ContentItemStatusValue PendingApprovalNew
		{
			get
			{
				if (_pendingApprovalNew == null)
				{
					_pendingApprovalNew = new ContentItemStatusValue(2, "Pending Approval (New)");
				}
				return _pendingApprovalNew;
			}
		}

		private static ContentItemStatusValue _pendingApprovalModified;
		public static ContentItemStatusValue PendingApprovalModified
		{
			get
			{
				if (_pendingApprovalModified == null)
				{
					_pendingApprovalModified = new ContentItemStatusValue(5, "Pending Approval (Modified)");
				}
				return _pendingApprovalModified;
			}
		}

		private static ContentItemStatusValue _retired;
		public static ContentItemStatusValue Retired
		{
			get
			{
				if (_retired == null)
				{
					_retired = new ContentItemStatusValue(6, "Retired");
				}
				return _retired;
			}
		}

		public class ContentItemStatusValue
		{
			private int _id;
			private string _name;

			public int Id
			{
				get
				{
					return _id;
				}
			}

			public string Name
			{
				get
				{
					return _name;
				}
			}

			public ContentItemStatusValue(int id, string name)
			{
				_id = id;
				_name = name;
			}

			public override string ToString()
			{
				return _name;
			}
		}
	}

	
}
